package com.dc.designPattern._11_proxy.impl._1_staticproxy;

/**
 * Description: 代理模式_代理对象
 * @author: gdc
 * @date: 2021/4/13
 * @version 1.0
 */
public class TeacherDaoProxy implements ITeacherDao {

    /**
     * 目标对象，通过接口来聚合
     */
    private ITeacherDao teacherDao;

    public TeacherDaoProxy(ITeacherDao teacherDao) {
        this.teacherDao = teacherDao;
    }

    @Override
    public void teach() {
        System.out.println("开始代理  完成某些操作。。。。。");

        teacherDao.teach();

        System.out.println("结束代理 。。。。。。。。。。。");
    }
}
